import React from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'
import './index.css'
import './main.css'
// import { Cat } from './components/Cat'
// console.log(typeof (<Cat />)) //object
// console.log(typeof Cat) //function

//拿到根节点
const container = document.getElementById('root')
//通过creatRoot()函数来创建react
const root = createRoot(container)
//渲染 只会执行一次
root.render(<App />)

//每隔两秒渲染一次
// setInterval(() => {
//   root.render(<Cat />)
// }, 2000)
// root.render(<h2>hello world</h2>)
